package com.gwnet.shop.controller.api;

import com.gwnet.common.mybatis.core.page.TableDataInfo;
import com.gwnet.shop.controller.MBaseController;
import com.gwnet.shop.domain.ShopBanner;
import com.gwnet.shop.service.IShopBannerService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商城轮播图Controller
 * @author zhangwanpeng
 * @date 2024-08-08
 */
@RestController
@RequestMapping("/api/banner")
public class ShopBannerApiController extends MBaseController
{
    @Resource
    private IShopBannerService shopBannerService;

    /**
     * 查询商城轮播图列表
     */
    @GetMapping("/list")
    public TableDataInfo list(ShopBanner shopBanner)
    {
        startPage();
        List<ShopBanner> list = shopBannerService.selectShopBannerList(shopBanner);
        return getDataTable(list);
    }

}
